﻿
//Author: 张亚涛
//createtime:2011-10-13 10:31:29
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Model
{
    public class CarType
    {
        public CarType()
        { }
        public CarType(IDataReader reader)
        {
            _typeID = long.Parse(reader["TypeID"].ToString());
            if (reader["TypeName"] != DBNull.Value)
            {
                _typeName = reader["TypeName"].ToString();
            }
            if (reader["Letter"] != DBNull.Value)
            {
                _letter = reader["Letter"].ToString();
            }
            if (reader["Logo"] != DBNull.Value)
            {
                _logo = reader["Logo"].ToString();
            }
            if (reader["ParentID"] != DBNull.Value)
            {
                _parentID = long.Parse(reader["ParentID"].ToString());
            }
            if (reader["ParentPath"] != DBNull.Value)
            {
                _parentPath = reader["ParentPath"].ToString();
            }
            if (reader["Depth"] != DBNull.Value)
            {
                this._depth = int.Parse(reader["Depth"].ToString());
            }
            if (reader["OrderID"] != DBNull.Value)
            {
                _orderID = int.Parse(reader["OrderID"].ToString());
            }
        }

        #region 数据库字段
        private long _typeID;
        private string _typeName;
        private string _letter;
        private string _logo = "carlogo/none.png";
        private long _parentID;
        private string _parentPath;
        private int _depth;
        private int _orderID;
        #endregion

        #region 字段属性
        /// <summary>
        /// 车型ID
        /// </summary>
        public long TypeID
        {
            set { _typeID = value; }
            get { return _typeID; }
        }
        /// <summary>
        /// 车型名称
        /// </summary>
        public string TypeName
        {
            set { _typeName = value; }
            get { return _typeName; }
        }
        /// <summary>
        /// 首字母
        /// </summary>
        public string Letter
        {
            set { _letter = value; }
            get { return _letter; }
        }
        /// <summary>
        /// 首字母
        /// </summary>
        public string Logo
        {
            set { _logo = value; }
            get { return _logo; }
        }
        /// <summary>
        /// 父级ID
        /// </summary>
        public long ParentID
        {
            set { _parentID = value; }
            get { return _parentID; }
        }
        /// <summary>
        /// 父路径
        /// </summary>
        public string ParentPath
        {
            set { _parentPath = value; }
            get { return _parentPath; }
        }
        /// <summary>
        /// 深度
        /// </summary>
        public int Depth
        {
            set { _depth = value; }
            get { return _depth; }
        }
        /// <summary>
        /// 排序 
        /// </summary>
        public int OrderID
        {
            set { _orderID = value; }
            get { return _orderID; }
        }
        #endregion
    }
}